package com.axjy.scheduler.controller;

import com.axjy.comm.pojo.TpSchedulerSeat;
import com.axjy.comm.vo.Result;
import com.axjy.scheduler.service.SchedulerSeatService;
import com.axjy.scheduler.vo.CinemaSeatVo;
import com.axjy.scheduler.vo.SeatArrayVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class SchedulerSeatController {

    @Resource
    private SchedulerSeatService schedulerSeatService;

    @RequestMapping("/p/queryOriginalCinemaSeatArray")
    public Result queryOriginalCinemaSeatArray(@RequestBody TpSchedulerSeat seat){
        SeatArrayVo vo = schedulerSeatService.queryOriginalCinemaSeatArray(seat.getScheduleId());
        return Result.success(vo);
    }

    @RequestMapping("/p/queryCinemaSeatArrayByScheduleId")
    public Result queryCinemaSeatArrayByScheduleId(@RequestBody CinemaSeatVo cinemaSeatVo){
        CinemaSeatVo cinemaSeatVo1 = schedulerSeatService.queryCinemaSeatArrayByScheduleId(cinemaSeatVo.getScheduleId(),cinemaSeatVo.getCinemaId());
        return Result.success(cinemaSeatVo1);
    }
}
